package com.yu.blog.entities.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yu.blog.entities.baseEntity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.validation.annotation.Validated;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Validated
@TableName("p_admin")
@Schema(description = "用户列表")
public class Admin extends BaseEntity implements Serializable {
    @Schema(description = "用户名")
    @TableField("admin_name")
    @NotBlank(message = "用户名不能为空")
    private String adminName;
    @Schema(description = "用户密码")
    @TableField("admin_password")
    @NotBlank(message = "用户密码不能为空")
    private String adminPassword;
    @Schema(description = "用户状态（0：正常 1：停用）")
    @TableField("status")
    private boolean status;
}
